	<meta charset="utf-8" />

<?php
$uid = $_GET['uid'];  //接收userList.php页面传来的待修改用户的uid参数
//连接数据库
mysql_connect("localhost","root","1161105403");
   mysql_select_db("neuvideo");
   mysql_query("set names utf8");

//编写sql语句根据uid取得待修改用户的信息并保存在$row数组中
   $sql = "select * from users where uid={$uid}";   
   $result = mysql_query($sql) or die('查询失败！'.mysql_error());   
   $row = mysql_fetch_assoc($result);
?>
<form action="doUserUpdate.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="uid" value="<?php echo $row["uid"];?>">
	<table border="1">
		<tr>
			<td>用户名</td>
			<td>
			<input type="text" class="form-control" id="username" readonly="readonly" name="uname" value=<?php  echo $row["uname"];  ?>>
			</td>
		</tr>
		<tr>
			<td>性别</td>
			<td>
			<input type="radio" name="gender" value="0" <?php 
			if($row["gender"]==0)
				echo "checked";
			?>>男
			<input type="radio" name="gender" value="1" <?php 
			if($row["gender"]==1)
				echo "checked";
			?>>女
			</td>
		</tr>
		<tr>
			<td>生日</td>
			<td><input type="date" name="birthdate" value="<?php echo $row["birthdate"]; ?>"></td>
		</tr>
		<tr>
			<td>头像</td>
			<td><input type="file" name="pic">原头像<img src="../images/<?php echo $row["pic"]; ?>" width="100" height="100"></td>
		</tr>
		<tr>
		<td>电子邮件</td>
		<td>
		<input type="email" name="email" class="form-control"  value=<?php  echo $row["email"];  ?>>
		</td>
		</tr>
		<tr>
			<td colspan="2"><input type="submit" value="更新"></td>
		</tr>
	</table>
</form>
